package com.example.bugdroid;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;

public class MainActivity extends Activity {
	Button transmitter, receiver;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		init();
		setters();
	}

	public void init() {
		transmitter = (Button) findViewById(R.id.transmitter);
		receiver = (Button) findViewById(R.id.receiver);
	}

	public void setters() {
		transmitter.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Toast.makeText(getApplicationContext(), "go to transmitter", Toast.LENGTH_SHORT).show();
				Intent i = new Intent(MainActivity.this, Transmitter.class);
				startActivity(i);
			}
		});
		receiver.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Toast.makeText(getApplicationContext(), "go to receiver", Toast.LENGTH_SHORT).show();
				Intent i = new Intent(MainActivity.this, Receiver.class);
				startActivity(i);
			}
		});
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}

}
